import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "登录",
    component: () => import("../views/login/login.vue"),
  },
  {
    path: "/usermsg",
    name: "个人信息",
    component: () => import("../views/login/usermsg.vue"),
  },
  {
    path: "/userHome",
    name: "员工端-首页",
    component: () => import("../views/user/userHome.vue"),
  },
  {
    path: "/userHome2",
    name: "员工端-首页2",
    component: () => import("../views/user/userHome2.vue"),
  },
  {
    path: "/userHome3",
    name: "员工端-首页3",
    component: () => import("../views/user/userHome3.vue"),
  },
  {
    path: "/userHome4",
    name: "员工端-首页4",
    component: () => import("../views/user/userHome4.vue"),
  },

  {
    path: "/managerHome",
    name: "管理者-首页",
    component: () => import("../views/manager/managerHome.vue"),
  },
  {
    path: "/managerHome2",
    name: "管理者-首页2",
    component: () => import("../views/manager/managerHome2.vue"),
  },
  {
    path: "/managerHome1",
    name: "管理者-首页1",
    component: () => import("../views/manager/managerHome1.vue"),
  },
  {
    path: "/weijichat",
    name: "危机干预对话",
    component: () => import("../views/manager/weijichat.vue"),
  },
  {
    path: "/dpwjgy",
    name: "（打破）危机干预情况",
    component: () => import("../views/manager/dpwjgy.vue"),
  },
  {
    path: "/fdpwjgy",
    name: "（非打破）危机干预情况",
    component: () => import("../views/manager/fdpwjgy.vue"),
  },
  {
    path: "/zisha",
    name: "管理者-自杀尝试-自杀未遂",
    component: () => import("../views/manager/zisha.vue"),
  },
  {
    path: "/fuwu",
    name: "管理者-服务评价提交",
    component: () => import("../views/manager/fuwu.vue"),
  },
  {
    path: "/genjin",
    name: "跟进记录",
    component: () => import("../views/manager/genjin.vue"),
  },
  {
    path: "/taping",
    name: "管理者-他评",
    component: () => import("../views/manager/taping.vue"),
  },
  {
    path: "/my",
    name: "管理者-我的",
    component: () => import("../views/user/my.vue"),
  },
  {
    path: "/weijiganyu",
    name: "管理者-危机干预资料九宫格",
    component: () => import("../views/manager/weijiganyu.vue"),
  },
  {
    path: "/weijigean",
    name: "管理者-危机个案列表",
    component: () => import("../views/manager/weijigean.vue"),
  },
  {
    path: "/yijianzhuanjie",
    name: "管理者-一键转介",
    component: () => import("../views/manager/yijianzhuanjie.vue"),
  },
  {
    path: "/dklx",
    name: "员工端-打卡练习",
    component: () => import("../views/user/dklx.vue"),
  },
  {
    path: "/dkfrom",
    name: "员工端-打卡表单",
    component: () => import("../views/user/dkfrom.vue"),
  },
  {
    path: "/dklxxx",
    name: "员工端-打卡练习学习页",
    component: () => import("../views/user/dklxxx.vue"),
  },
  {
    path: "/dkanswer",
    name: "员工端-打卡答题",
    component: () => import("../views/user/dkanswer.vue"),
  },
  {
    path: "/dkReport",
    name: "员工端-打卡报告",
    component: () => import("../views/user/dkReport.vue"),
  },
  {
    path: "/pj",
    name: "员工端-评价",
    component: () => import("../views/user/pj.vue"),
  },
  {
    path: "/tjkchb",
    name: "员工端-推荐课程海报",
    component: () => import("../views/user/tjkchb.vue"),
  },
  {
    path: "/userMy",
    name: "员工端-我的",
    component: () => import("../views/user/my.vue"),
  },
  {
    path: "/yycgtj",
    name: "员工端-预约成功推荐页",
    component: () => import("../views/user/yycgtj.vue"),
  },

  {
    path: "/sjkb",
    name: "员工数据看板",
    component: () => import("../views/manager/sjkb.vue"),
  },

  {
    path: "/wjfrom",
    name: "管理端-危机复盘表",
    component: () => import("../views/manager/wjfrom.vue"),
  },
  {
    path: "/wjgack",
    name: "管理端-危机个案查看",
    component: () => import("../views/manager/wjgack.vue"),
  },
  {
    path: "/wjgalb",
    name: "危机个案列表",
    component: () => import("../views/user/wjgalb.vue"),
  },

  {
    path: "/appointment/list",
    name: "预约咨询列表",
    component: () => import("../views/appointment/list.vue"),
  },
  {
    path: "/appointment/TCcontent",
    name: "预约详情",
    component: () => import("../views/appointment/TCcontent.vue"),
  },
  {
    path: "/appointment/from",
    name: "提交预约",
    component: () => import("../views/appointment/from.vue"),
  },
  {
    path: "/yyjl",
    name: "预约记录",
    component: () => import("../views/appointment/yyjl.vue"),
  },
  {
    path: "/yyjlxq",
    name: "预约记录详情",
    component: () => import("../views/appointment/yyjlxq.vue"),
  },
  {
    path: "/CP/yindaoyu",
    name: "测评引导语",
    component: () => import("../views/CP/yindaoyu.vue"),
  },
  {
    path: "/CP/answer",
    name: "自评量表",
    component: () => import("../views/CP/answer.vue"),
  },
  {
    path: "/CP/Report",
    name: "报告结果",
    component: () => import("../views/CP/Report.vue"),
  },
  {
    path: "/CP/RecordReport",
    name: "历史报告结果",
    component: () => import("../views/CP/RecordReport.vue"),
  },
  {
    path: "/CP/votelogList",
    name: "测评记录",
    component: () => import("../views/CP/votelogList.vue"),
  },
  // 咨询师端
  {
    path: "/case/weijigean",
    name: "咨询师-危机个案列表",
    component: () => import("../views/case/weijigean.vue"),
  },
  {
    path: "/case/wjgack",
    name: "咨询师-查看详情",
    component: () => import("../views/case/wjgack.vue"),
  },
  {
    path: "/case/PracticeList",
    name: "咨询师-练习列表",
    component: () => import("../views/case/PracticeList.vue"),
  },
  {
    path: "/case/assignPractice",
    name: "咨询师-分配个人训练",
    component: () => import("../views/case/assignPractice.vue"),
  },
  {
    path: "/case/wjgatx",
    name: "咨询师-危机个案填写",
    component: () => import("../views/case/wjgatx.vue"),
  },
  // 知识库
  {
    path: "/manager/zhishiku/fengxiantance",
    name: "心理风险探测",
    component: () => import("../views/manager/zhishiku/fengxiantance.vue"),
  },
  {
    path: "/manager/zhishiku/fengxianxiangying",
    name: "心理风险响应",
    component: () => import("../views/manager/zhishiku/fengxianxiangying.vue"),
  },
  {
    path: "/manager/zhishiku/zuzhi",
    name: "组织士气与动力恢复",
    component: () => import("../views/manager/zhishiku/zuzhi.vue"),
  },
  {
    path: "/manager/zhishiku/imgmsg",
    name: "内容图片",
    component: () => import("../views/manager/zhishiku/imgmsg.vue"),
  },
  {
    path: "/manager/reportPdf",
    name: "反馈报告",
    component: () => import("../views/manager/reportPdf.vue"),
  },
  {
    path: "/trial/banner",
    name: "DRM",
    component: () => import("../views/trial/banner.vue"),
  },
  {
    path: "/trial/home",
    name: "DRM",
    component: () => import("../views/trial/home.vue"),
  },
  {
    path: "/trial/cjtitle",
    name: "DRM",
    component: () => import("../views/trial/cjtitle.vue"),
  },
  {
    path: "/trial/changjing1",
    name: "DRM",
    component: () => import("../views/trial/changjing1.vue"),
  },
  {
    path: "/trial/changjing2",
    name: "DRM",
    component: () => import("../views/trial/changjing2.vue"),
  },
  {
    path: "/trial/changjing3",
    name: "DRM",
    component: () => import("../views/trial/changjing3.vue"),
  },
  {
    path: "/trial/tab1",
    name: "DRM",
    component: () => import("../views/trial/tab1.vue"),
  },
  {
    path: "/trial/tab2",
    name: "DRM",
    component: () => import("../views/trial/tab2.vue"),
  },
  {
    path: "/trial/tab3",
    name: "DRM",
    component: () => import("../views/trial/tab3.vue"),
  },
  {
    path: "/trial/fxgyimg",
    name: "DRM",
    component: () => import("../views/trial/fxgyimg.vue"),
  },
  {
    path: "/trial/funeng",
    name: "DRM",
    component: () => import("../views/trial/funeng.vue"),
  },
  {
    path: "/trial/sjkb",
    name: "DRM",
    component: () => import("../views/trial/sjkb.vue"),
  },
  {
    path: "/trial/huiyi",
    name: "预约会议",
    component: () => import("../views/trial/huiyi.vue"),
  },
  {
    path: "/minsheng/login",
    name: "DRM",
    component: () => import("../views/minsheng/login.vue"),
  },
  {
    path: "/minsheng/taping",
    name: "DRM",
    component: () => import("../views/minsheng/taping.vue"),
  },
  {
    path: "/minsheng/tapingbanner",
    name: "DRM",
    component: () => import("../views/minsheng/tapingbanner.vue"),
  },
];

const router = new VueRouter({
  routes,
  scrollBehavior(to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition;
    } else {
      return { x: 0, y: 0 };
    }
  },
});

export default router;
